﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %>
<h2><%=ViewData["graphName"]%></h2>
<div id="chartArea"></div>
<%
    string sUrl = Url.Content("~/Graph/Display");
    sUrl += "?factoryId=" + ViewData["factoryId"] + "&graphType=" + ViewData["graphType"] + "&subGraphType=" + ViewData["subGraphType"];
    sUrl += "&id=" + ViewData["id"] + "&fromDate=" + ViewData["fromDate"] + "&toDate=" + ViewData["toDate"];
%>
<script type="text/javascript">
    var chart2 = new FusionCharts("../../Scripts/FusionCharts/Charts/MSLine.swf", "ChId1", "800", "600");
    chart2.setDataURL("<%=Url.Encode(sUrl) %>");
    chart2.render("chartArea");
</script>